﻿@model HouseAgencySite.Models.HouseInfos

@{
    ViewBag.Title = "房源明细";
    Layout = "~/Areas/Admin/Views/Shared/_DetailLayout.cshtml";

    List<SelectListItem> list = HouseAgencySite.Utils.ParamHelper.GetHouseArea(Request["AreaID"], true);
    List<SelectListItem> listHuXing = HouseAgencySite.Utils.ParamHelper.HuXing(true, Request["AreaID"]);
    List<SelectListItem> listHouseType = HouseAgencySite.Utils.ParamHelper.HouseType(true, Request["AreaID"]);
}
<table class="table table-bordered">
    <thead>
        <tr class="success">
            <th colspan="2" class="text-center xl">@ViewBag.Title</th>
        </tr>
    </thead>
    <tr>
        <td>
            <div class="display-label">
                @Html.DisplayNameFor(model => model.HouseType)
            </div>
            <div class="display-field">
                @listHouseType.FirstOrDefault(o => o.Value == Model.HouseType.ToString()).Text
            </div>
        </td>
    </tr>
    <tr>
        <td>
            <div class="display-label">
                @Html.DisplayNameFor(model => model.Title)
            </div>
        </td>
        <td>
            <div class="display-field">
                @Html.DisplayFor(model => model.Title)
            </div>
        </td>
    </tr>
    <tr>
        <td>
            <div class="display-label">
                @Html.DisplayNameFor(model => model.SubTitle)
            </div>
            <div class="display-field">
                @Html.DisplayFor(model => model.SubTitle)
            </div>
        </td>
    </tr>
    <tr>
        <td>
            <div class="display-label">
                @Html.DisplayNameFor(model => model.Price)
            </div>
        </td>
        <td>
            <div class="display-field">
                @Html.DisplayFor(model => model.Price)
            </div>
        </td>
    </tr>
    <tr>
        <td>
            <div class="display-label">
                @Html.DisplayNameFor(model => model.MianJi)
            </div>
        </td>
        <td>
            <div class="display-field">
                @Html.DisplayFor(model => model.MianJi)
            </div>
        </td>
    </tr>
    <tr>
        <td>

            <div class="display-label">
                @Html.DisplayNameFor(model => model.LouCeng)
            </div>
        </td>
        <td>
            <div class="display-field">
                @Html.DisplayFor(model => model.LouCeng)
            </div>
        </td>
    </tr>
    <tr>
        <td>

            <div class="display-label">
                @listHuXing.FirstOrDefault(o => o.Value == Model.HuXing.ToString()).Text
            </div>
        </td>
        <td>
            <div class="display-field">
                @Html.DisplayFor(model => model.HuXing)
            </div>
        </td>
    </tr>
    <tr>
        <td>

            <div class="display-label">
                @Html.DisplayNameFor(model => model.Description)
            </div>
        </td>
        <td>
            <div class="display-field">
                @Html.Raw(Model.Description)
            </div>
        </td>
    </tr>
    <tr>
        <td>

            <div class="display-label">
                @Html.DisplayNameFor(model => model.ZhaiYao)
            </div>
        </td>
        <td>
            <div class="display-field">
                @Html.DisplayFor(model => model.ZhaiYao)
            </div>
        </td>
    </tr>
    <tr>
        <td>

            <div class="display-label">
                @Html.DisplayNameFor(model => model.AreaID)
            </div>
        </td>
        <td>
            <div class="display-field">
                @list.FirstOrDefault(o => o.Value == Model.AreaID.ToString()).Text.Replace("/", "")
            </div>
        </td>
    </tr>
    <tr>
        <td>

            <div class="display-label">
                @Html.DisplayNameFor(model => model.AddressDetail)
            </div>
        </td>
        <td>
            <div class="display-field">
                @Html.DisplayFor(model => model.AddressDetail)
            </div>
        </td>
    </tr>
    <tr>
        <td>

            <div class="display-label">
                @Html.DisplayNameFor(model => model.Around)
            </div>
        </td>
        <td>
            <div class="display-field">
                @Html.Raw(Model.Around)
            </div>
        </td>
    </tr>
    <tr>
        <td>
            <div class="display-label">
                @Html.DisplayNameFor(model => model.JiaoTong)
            </div>
        </td>
        <td>
            <div class="display-field">
                @Html.Raw(Model.JiaoTong)
            </div>
        </td>
    </tr>

    <tr style="display:none;">

        <td>
            <div class="display-label">
                @Html.DisplayNameFor(model => model.MapUrl)
            </div>
        </td>
        <td>
            <div class="display-field">
                @Html.DisplayFor(model => model.MapUrl)
            </div>
        </td>
    </tr>
    <tr>
        <td>
            <div class="display-label">
                @Html.DisplayNameFor(model => model.AttachUrl)
            </div>
        </td>
        <td>
            <div class="display-field">
               <div id="imgpreview"></div>
            </div>
        </td>
    </tr>
    <tr>
        <td>
            <div class="display-label">
                @Html.DisplayNameFor(model => model.CreateTime)
            </div>
        </td>
        <td>
            <div class="display-field">
                @Html.DisplayFor(model => model.CreateTime)
            </div>
        </td>
    </tr>
    <tr>
        <td>
            <div class="display-label">
                @Html.DisplayNameFor(model => model.CreateUserName)
            </div>
        </td>
        <td>
            <div class="display-field">
                @Html.DisplayFor(model => model.CreateUserName)
            </div>
        </td>
    </tr>
    <tr>
        <td>

            <div class="display-label">
                @Html.DisplayNameFor(model => model.ModifyTime)
            </div>
        </td>
        <td>
            <div class="display-field">
                @Html.DisplayFor(model => model.ModifyTime)
            </div>
        </td>
    </tr>

    <tr>
        <td>

            <div class="display-label">
                @Html.DisplayNameFor(model => model.ModifyUserName)
            </div>
        </td>
        <td>
            <div class="display-field">
                @Html.DisplayFor(model => model.ModifyUserName)
            </div>
        </td>
    </tr>
</table>
<script>
    $(function () {       
        LoadImgs('@(Model.Guid)', 'imgpreview');
    });
</script>